@import '../common-var.less';

.layout-module_domain {

  .userInfo-module_userWrapper {
    display: flex;
    margin-top: 48px;

    .userInfo-module_avatarWrapper {
      position: relative;

      .ant-image {
        display: block;

        .userInfo-module_avatar {
          height: 120px;
          width: 120px;
          margin-top: 15px;
          border-radius: 82px;
          border-color: rgba(0, 0, 0, 0.06);
          border-width: 1px;
          border-style: solid;
          overflow: hidden;
          position: relative;
          background-color: #FFFFFF;
        }
      }
    }

    .userInfo-module_info {
      margin-left: 52px;
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: center;

      .userInfo-module_name {
        display: flex;
        align-items: center;

        .userInfo-module_nickname {
          font-size: 24px;
          line-height: 32px;
          font-weight: 600;
          margin-top: 12px;
        }

        .userInfo-module_level {
          text-align: center;
          cursor: pointer;
          position: relative !important;
          top: 0 !important;
          right: 0;
          width: 25px;
          height: 25px;
          margin-left: 5px;
          padding-bottom: 50px;

          .iconfont {
            font-size: 25px;
          }
        }

      }

      .userInfo-module_tag {
        margin: 10px 0 5px 0;
      }

      .userInfo-module_description {
        font-size: 14px;
        color: var(--title-color);
        line-height: 22px;
        font-weight: 400;
        margin-top: 12px;
        display: -webkit-box;
        -webkit-box-orient: vertical; /* 使盒子垂直排列子元素 */
        -webkit-line-clamp: 3; /* 限制显示两行 */
        overflow: hidden; /* 隐藏超出内容 */
        text-overflow: ellipsis; /* 添加省略号 */
      }

      .userInfo-module_detail {
        font-size: 14px;
        color: var(--title-color);
        display: flex;
        margin-top: 16px;

        span {
          margin-right: 8px;
        }

        .index-module_meta {
          display: flex;
          line-height: 22px;
          max-width: 60%;
          display: -webkit-box;
          -webkit-box-orient: vertical; /* 使盒子垂直排列子元素 */
          -webkit-line-clamp: 1; /* 限制显示两行 */
          overflow: hidden; /* 隐藏超出内容 */
          text-overflow: ellipsis; /* 添加省略号 */
        }
      }

      .userInfo-module_followInfo {
        margin-top: 15px;
        display: flex;
        align-items: center;

        .userInfo-module_followItem {
          margin-right: 28px;
          display: flex;
          align-items: center;

          .userInfo-module_count {
            font-size: 18px;
            color: var(--font-color);
            line-height: 26px;
            font-weight: 700;
            margin-right: 8px;
          }

          .userInfo-module_label {
            font-size: 14px;
            color: var(--title-color);
            text-align: center;
            line-height: 26px;
            font-weight: 400;
          }
        }

        .userInfo-module_followingFollowers {
          display: none;
        }
      }
    }
  }

  .readme-module_userBoardParent {
    margin-top: 10px;
    margin-bottom: 20px;

    .readme-module_empty {
      cursor: pointer;
      border: 1px dashed @border-color_normal;
      height: 135px;
      border-radius: 8px;
      width: 100%;
      display: flex;
      margin-top: 24px;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      .readme-module_emptyTitle {
        font-size: 16px;
        letter-spacing: 0;
        line-height: 24px;
        font-weight: 500;
        text-align: center;
        margin-bottom: 12px;
      }

      .readme-module_emptyDesc {
        font-size: 14px;
        color: var(--title-color);
        letter-spacing: 0;
        text-align: center;
        font-weight: 400;
      }
    }

    .readme-module_empty:hover {
      border: 1px dashed #00B96B;
    }

    .readme-module_editor {
      width: 100%;
      min-height: 223px;
      position: relative;

      .readme-edit_action {
        visibility: hidden;
        display: flex;
        flex-direction: row-reverse;

        .ivu-btn {
          padding: 0 11px;
          height: 26px;
          border-color: transparent;
        }
      }

      .editorBase-module_editor {
        position: relative;
        height: 100%;
        border-radius: 4px;
        border: 1px solid transparent;

        .layout-mode-adapt {
          position: relative;
          display: flex;
          height: auto;
          border-radius: 4px;
          margin-top: 5px;
          flex-direction: column;

          .toolbar-ui {
            position: static;
            z-index: auto;
            display: none;

            .editor-toolbar {
              justify-content: unset;
              border: none;
              padding: 0 12px 0 12px;

              /deep/ .toolbar-button {
                color: var(--title-color);

                &:hover {
                  background: var(--dropdown-item-hover);
                  color: var(--font-color);
                }
              }

              /deep/ .toolbar-button-active {
                background-color: var(--dropdown-item-hover);
              }

              /deep/ .editor-toolbar-content {
                display: flex;
                justify-content: unset;

                .editor-toolbar-group {
                  border: none;

                  &:first-child {
                    padding: 4px 0 4px 4px;
                  }

                  &:last-child {
                    padding: 4px 4px 4px 0;
                  }
                }
              }

              /deep/ .toolbar-dropdown-list {
                background: var(--dropdown-bg-color);
                border-color: @border-color_normal;

                .toolbar-collapse-header, .toolbar-collapse-item-title {
                  color: @grey-white-font-color;
                }

                .toolbar-collapse-item-active {
                  background: var(--dropdown-item-hover);
                }
              }
            }
          }

          .editor-body {
            height: auto;
            position: relative;

            .editor-wrapper {
              position: relative;
              overflow-anchor: none;
              display: flex;
              height: auto;
              overflow: visible;
              padding-top: 0;

              .editor-wrap-content {
                flex: 1;
                width: 100%;
                min-width: auto;
                margin: 0;

                .editor-outer-wrap-box {
                  width: auto;
                  min-width: auto;
                  padding-bottom: 0;

                  .editor-wrap-box {
                    border: none;
                    box-shadow: none;
                    background: none;
                    margin-bottom: 0;

                    .readme-editor {
                      min-height: 188px;
                      background: none;
                      color: var(--font-color);
                    }

                    .editing {
                      padding: 16px 24px 8px 24px;
                    }
                  }
                }
              }
            }
          }
        }

        &:hover {
          border-color: var(--border-color);
        }
      }

      .editing {
        margin-top: 24px;
        border-color: var(--border-color);

        .toolbar-ui {
          display: unset !important;
        }

        .toolbar-ui-fixed {
          position: fixed !important;
          top: 0px;
          background: var(--theme-color);
          z-index: 2 !important;
        }

        .readme-editor {
          padding: 10px 16px 8px 18px;
        }
      }

      .readme-submit_action {
        margin-top: 15px;

        .readme-module_cancel {
          margin-left: 5px;
          color: var(--font-color);
          font-size: 14px;

          &:hover {
            color: @primary-color;
            background: unset;
          }
        }
      }

      &:hover {
        .readme-edit_action {
          visibility: visible;
        }

        .editorBase-module_editor {
          border-color: var(--border-color);
        }
      }
    }
  }

  .columns-module_publicColumn {
    margin-bottom: 20px;

    .columns-module_header {
      color: var(--font-color);
      font-weight: 500;
      margin-bottom: 15px;
      display: flex;
      justify-content: space-between;

      .operate-box {
        color: var(--font-color);

        .expand {
          margin-left: 5px;
          font-size: 14px;
        }
      }
    }

    .columns-module_column-list {
      display: flex;
      flex-wrap: wrap;

      .column-empty {
        margin: 0 auto;
      }

      .topic-card {
        width: 32%;
        border: 1px solid hsla(0, 0%, 0%, 0.04);
        border-radius: 8px;
        position: relative;
        box-sizing: border-box;
        overflow: hidden;
        margin-bottom: 15px;

        &:not(:nth-child(3n)) {
          margin-right: calc(6% / 3);
        }

        /deep/ .ant-card-cover {
          width: 100%;
          height: 110px;
          overflow: hidden;
          cursor: auto;

          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
        }

        /deep/ .ant-card-body {
          width: 100%;
          height: 120px;
          padding: 0;

          .ant-card-meta {
            margin: -27px 0;

            .topic-avatar {
              margin-left: 30px;
            }

            .card-content-item {
              width: 100%;
              padding-left: 15px;
              padding-right: 15px;
              padding-top: 3px;

              .topic-title {
                width: 100%;
                font-size: 15px;
                color: var(--font-color);
                letter-spacing: 0;
                text-align: left;
                line-height: 25px;
                font-weight: 600;
                z-index: 4;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                margin-bottom: 3px;
              }

              .topic-description {
                width: 100%;
                font-size: 12px;
                color: var(--title-color);
                line-height: 20px;
                display: -webkit-box;
                height: 40px;
                -webkit-box-orient: vertical; /* 使盒子垂直排列子元素 */
                -webkit-line-clamp: 2; /* 限制显示两行 */
                overflow: hidden; /* 隐藏超出内容 */
                text-overflow: ellipsis; /* 添加省略号 */
                white-space: normal;
                margin-bottom: 3px;
              }

              .topic-viewCount {
                color: var(--title-color);
                font-size: 12px;

                span {
                  color: var(--font-color);
                  font-weight: 500;
                }
              }
            }
          }
        }
      }
    }
  }

  .dataStats-module_hotMap {
    margin-bottom: 60px;

    .hotMap-show {
      margin-bottom: 10px;
      display: flex;
      flex-direction: row-reverse;

      .operate-box {
        color: var(--font-color);

        .expand {
          margin-left: 5px;
          font-size: 14px;
        }
      }
    }
  }
}

.delete-modal {
  .modal-delete-item {
    padding: 20px 20px 10px 20px;
    display: flex;

    .delete-icon {
      margin-right: 10px;

      .iconfont {
        font-size: 22px;
        color: orange;
      }
    }

    .delete-tips {
      p {
        font-size: 14px;
        line-height: 30px;
        margin-bottom: 2px;
      }
    }
  }

  /deep/ .ivu-modal-footer {
    border-color: var(--border-color);
  }
}

// 编辑器相关
/deep/ .table-wrapper {
  .table-header .table-header-item,
  .table-rows-header .table-rows-header-item,
  .table-cols-header .table-cols-header-item {
    background: var(--rj-editor-bg-color);
    border-color: var(--border-color);

    &:hover {
      background: var(--modal-bg-color);
    }
  }
}

// 可拖拽组件
/deep/ .data-card-dnd {
  background: var(--dropdown-item-hover);
}

// 通用工具栏
/deep/ .data-card-toolbar {
  .data-toolbar-group {
    background: var(--dropdown-bg-color);
    border-color: @border-color_normal;

    .data-toolbar-item:not(.data-toolbar-item-input):hover, .data-toolbar-item.active:not(.data-toolbar-item-input) {
      background-color: var(--dropdown-item-hover);
      border-radius: 4px;
    }

    .data-toolbar-btn {
      color: var(--title-color);
    }

    .ivu-select-selection {
      background: var(--dropdown-bg-color);
      border-color: @border-color_normal;

      .ivu-select-input {
        color: var(--font-color);
      }
    }

    .ivu-select-dropdown {
      background: var(--dropdown-bg-color);

      .ivu-select-item:hover, .ivu-select-item-focus {
        background: var(--dropdown-item-hover);
        color: var(--font-color);
      }
    }

    .data-toolbar-switch:hover {
      background: var(--dropdown-item-hover);
    }

    .table-color-dropdown-trigger .table-color-dropdown-button-text:hover, .table-color-dropdown-trigger .table-color-dropdown-arrow:hover {
      background-color: var(--dropdown-item-hover);
    }

    .table-color-dropdown-trigger:hover .table-color-dropdown-button-text, .table-color-dropdown-trigger:hover .table-color-dropdown-arrow {
      border-color: var(--border-color);
    }
  }
}

/deep/ .data-table-color-tool {
  background: var(--dropdown-bg-color);
  border-color: var(--border-color);

  .data-table-color-tool-default:hover {
    background: var(--dropdown-item-hover);
  }
}

/deep/ .ivu-select-dropdown {
  font-weight: normal;
  margin-top: 5px;

  .ivu-dropdown-item {
    padding: 0;

    .operate-item {
      display: flex;
      font-size: 13px !important;
      padding: 7px 16px;

      .true {
        font-size: 14px;
      }
    }
  }

}

